#pragma once
#include "afxcmn.h"

#include "ExtListHeadCtrl.h"

class CExtListHeadCtrl : public CHeaderCtrl
{
public:
	CExtListHeadCtrl(void);
	~CExtListHeadCtrl(void);


	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg LRESULT OnHeadLayOut(WPARAM wParam, LPARAM lParam);
	BOOL OnChildNotify(UINT uMessage, WPARAM wParam, LPARAM lParam, LRESULT* pResult);

public:
	void	SetHeaderHeight(int nHeaderHeight);					//设置头高度
	void	SetLockCount(UINT uLockCount);						//设置不允许拉伸个数(左到右)
	void	SetUnallowDbClickCount(UINT uCount);				//设置不允许双击隐藏个数(左到右)
	void	SetHeaderBkColor(COLORREF clrHeadBk);				//设置头背景颜色
	void	SetHeaderTextColor(COLORREF clrHeadText);			//设置头字体颜色
	void	SetHeaderFont(int nFontHeight, BOOL bBold = FALSE);
	void    SetHeaderBorder(BOOL bEnableBorder, COLORREF clrHeadBorder, UINT nPixel); 
	void	SetHeaderDivline(BOOL bEnableDivline, COLORREF clrHeadDivline, UINT nPixel);
private:
	void	DrawHeaderBorder(CDC *pDC);	                    //画头边框

private:
	COLORREF	m_clrHeadText;					//文本颜色		
	COLORREF	m_clrHeadBk;					//背景颜色

	COLORREF	m_clrHeadDivLine;				//分隔线颜色
	COLORREF	m_clrHeadBorder;				//边框颜色

	BOOL		m_bEnableBorder;				//是否画头边框
	BOOL		m_bEnableDivline;				//是否画分隔线

	int			m_nHeadBorderPixel;				//头边框像素
	int			m_nHeadDivlinePixel;			//头分隔线像素

	CFont		m_fontHeadText;					//文本字体
	int			m_nHeaderHeight;				//头行高

	UINT		m_uLockCount;					//不允许拉伸个数
	UINT		m_uUnallowDbClickCount;			//不允许双击隐藏个数
};

